import { IPSDERIndex } from './ipsderindex';
import { IPSDERIndexDEFieldMap } from './ipsderindex-defield-map';
import { PSDERBaseImpl } from './psderbase-impl';

export class PSDERIndexImpl extends PSDERBaseImpl implements IPSDERIndex {
  protected psderindexdefieldmaps: IPSDERIndexDEFieldMap[] | null = null;

  getPSDERIndexDEFieldMaps(): IPSDERIndexDEFieldMap[] | null {
    if (this.psderindexdefieldmaps == null) {
      this.psderindexdefieldmaps = this.fillChildListModel(this.M.getPSDERIndexDEFieldMaps, 'dataentity.der.IPSDERIndexDEFieldMap') as IPSDERIndexDEFieldMap[];
    }
    return this.psderindexdefieldmaps;
  }

  get psDERIndexDEFieldMaps(): IPSDERIndexDEFieldMap[] | null {
    return this.getPSDERIndexDEFieldMaps();
  }

  findPSDERIndexDEFieldMap(objKey: any): IPSDERIndexDEFieldMap | null {
    return this.getPSModel5('dataentity.der.IPSDERIndexDEFieldMap', this.getPSDERIndexDEFieldMaps(), objKey) as IPSDERIndexDEFieldMap;
  }

  get typeValue(): string {
    return this.M.typeValue;
  }

  get inherit(): boolean {
    return this.M.inherit != null ? this.M.inherit : false;
  }

  get virtual(): boolean {
    return this.M.virtual != null ? this.M.virtual : false;
  }

  get cls(): string {
    return 'PSDERIndexImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'dataentity.der.IPSDERIndex') return true;
    return super.instanceof(cls);
  }
}
